import { request } from "../request";
export interface Register_1Res {
    /* */
    code: number;

    /* */
    message: string;

    /* */
    data: Record<string, unknown>;

    /* */
    timestamp: Record<string, unknown>;
}
const registerAPI = async (data:{
    username:string,
    password:string,
    email:string,
}):Promise<Register_1Res> => {
    const token = localStorage.getItem("token");
    return request("/api/auth/register",{
        method: "post",
        headers: {
            "Content-Type": "application/json",
            "Authorization": `Bearer ${token}`,
        },
        data: data,
    })
}
export default registerAPI;